<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="IE=edge,chrome=1" charset="utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>BE.util.SettingsManager</title>
        <link rel="stylesheet" href="../css/default.css" type="text/css" media="screen, projection">
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/Array.html">Array</a></li>
	
	<li><a href="../symbols/BE.html">BE</a></li>
	
	<li><a href="../symbols/BE.comp.html">BE.comp</a></li>
	
	<li><a href="../symbols/BE.ERROR.html">BE.ERROR</a></li>
	
	<li><a href="../symbols/BE.layer.html">BE.layer</a></li>
	
	<li><a href="../symbols/BE.log.html">BE.log</a></li>
	
	<li><a href="../symbols/BE.proj.html">BE.proj</a></li>
	
	<li><a href="../symbols/BE.time.html">BE.time</a></li>
	
	<li><a href="../symbols/BE.ui.html">BE.ui</a></li>
	
	<li><a href="../symbols/BE.ui.viewsConstructor.html">BE.ui.viewsConstructor</a></li>
	
	<li><a href="../symbols/BE.util.SettingsManager.html">BE.util.SettingsManager</a></li>
	
	<li><a href="../symbols/String.html">String</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class BE.util.SettingsManager
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
				
			
				
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/_Users_collinbrooks_Dropbox_Scripts_AEScripts_BeforeEffects_src_util_util.jsxinc.html">util.jsxinc</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class BE.util.SettingsManager.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/BE.util.SettingsManager.html#constructor">BE.util.SettingsManager</a></b>(sectionName, settings)
							</div>
							<div class="description">Provides a way to easily store and retrieve settings that After Effects
should save.</div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class BE.util.SettingsManager.">
					<caption>Field Summary</caption>
					<thead>
						<tr>
							<th scope="col">Field Attributes</th>
							<th scope="col">Field Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/BE.util.SettingsManager.html#sectionName">sectionName</a></b>
								</div>
								<div class="description">The name for After Effects to use as this group of settings' section
name.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/BE.util.SettingsManager.html#settings">settings</a></b>
								</div>
								<div class="description">The settings Object that contains the settings to be managed by this
SettingsManager.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class BE.util.SettingsManager.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#get">get</a></b>(settingName)
								</div>
								<div class="description">Returns the current value of a setting.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#load">load</a></b>(settingName)
								</div>
								<div class="description">Loads a single setting.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#loadAll">loadAll</a></b>()
								</div>
								<div class="description">Loads all of the settings being managed by this SettingsManager.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#noSettings">noSettings</a></b>()
								</div>
								<div class="description">Checks to see if there aren't any settings associated with this
SettingsManager.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#save">save</a></b>(settingName)
								</div>
								<div class="description">Saves the given setting.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#saveAll">saveAll</a></b>()
								</div>
								<div class="description">Saves all of the settings being managed by this SettingsManager.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#set">set</a></b>(settingName, settingValue)
								</div>
								<div class="description">Sets a setting value.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/BE.util.SettingsManager.html#settingExists">settingExists</a></b>(settingName)
								</div>
								<div class="description">Checks to see if a given setting exists within this SettingsManager.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>BE.util.SettingsManager</b>(sectionName, settings)
				</div>
				
				<div class="description">
					Provides a way to easily store and retrieve settings that After Effects
should save. Settings are automatically saved on <code>set</code> and loaded
on <code>get</code>.
					
				</div>
				
				
				
				<pre class="code">  var settingsManager = BE.util.SettingsManager("My Script Name",
      {
          "settingOne": "Setting One Value",
          "settingTwo": "Setting Two Value"
      }
  );
  settingsManager.get("settingOne");  //"Setting One Value"
  settingsManager.set("settingOne", "New Setting One Value");
  settingsManager.get("settingOne");  //"New Setting One Value");</pre>
				
				
				
				
					
						<dl class="detailList">
						<dt class="heading">Parameters:</dt>
						
							<dt>
								<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span>  <b>sectionName</b>
								
							</dt>
								<dd>The name that After Effects should use as this
group of setting's sectionName. This can be the name of your script.</dd>
						
							<dt>
								<span class="light fixedFont">{Object}</span>  <b>settings</b>
								
							</dt>
								<dd>An Object filled with key/value pairs to be saved
within After Effect's settings. If this argument is not provided, settings
will need to be added by using the <code>add<code> method.</dd>
						
						</dl>
					
					
					
					
					
						<dl class="detailList">
						<dt class="heading">Returns:</dt>
						
								<dd><span class="light fixedFont">{SettingsManager}</span> A BE.util.SettingsManager.</dd>
						
						</dl>
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			
				<div class="sectionTitle">
					Field Detail
				</div>
				
					<a name="sectionName"> </a>
					<div class="fixedFont">
					
					
					<b>sectionName</b>
					
					</div>
					<div class="description">
						The name for After Effects to use as this group of settings' section
name.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="settings"> </a>
					<div class="fixedFont">
					
					
					<b>settings</b>
					
					</div>
					<div class="description">
						The settings Object that contains the settings to be managed by this
SettingsManager.
						
						
					</div>
					
					

						
						
						
						

					
				
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name="get"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/String.html">String</a>}</span>
					<b>get</b>(settingName)
					
					</div>
					<div class="description">
						Returns the current value of a setting. It is an error if the given
setting does not exist.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
									
								</dt>
								<dd>The name of the setting to get the value for.</dd>
							
							</dl>
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Throws:</dt>
							
								<dt>
									 <b></b>
								</dt>
								<dd>errors.SETTING_DOES_NOT_EXIST</dd>
							
							</dl>
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> The value of the given setting.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="load"> </a>
					<div class="fixedFont">
					
					<span class="light">{SettingsManager}</span>
					<b>load</b>(settingName)
					
					</div>
					<div class="description">
						Loads a single setting. It is an error if the given setting does not
exist.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
									
								</dt>
								<dd>The name of the setting to load.</dd>
							
							</dl>
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Throws:</dt>
							
								<dt>
									 <b></b>
								</dt>
								<dd>errors.SETTING_DOES_NOT_EXIST</dd>
							
							</dl>
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="loadAll"> </a>
					<div class="fixedFont">
					
					<span class="light">{SettingsManager}</span>
					<b>loadAll</b>()
					
					</div>
					<div class="description">
						Loads all of the settings being managed by this SettingsManager. It is an
error if no settings have been registered with this SettingsManager.
						
						
					</div>
					
					
					
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Throws:</dt>
							
								<dt>
									 <b></b>
								</dt>
								<dd>errors.NO_SETTINGS</dd>
							
							</dl>
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="noSettings"> </a>
					<div class="fixedFont">
					
					<span class="light">{Bool}</span>
					<b>noSettings</b>()
					
					</div>
					<div class="description">
						Checks to see if there aren't any settings associated with this
SettingsManager.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Bool}</span> True if there aren't any settings associated with this
SettingsManager or false if there is at least one.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="save"> </a>
					<div class="fixedFont">
					
					<span class="light">{SettingsManager}</span>
					<b>save</b>(settingName)
					
					</div>
					<div class="description">
						Saves the given setting. It is an error if the setting does not exist
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
									<i>Optional</i>
								</dt>
								<dd>The setting to save or, if undefined,
save all settings.</dd>
							
							</dl>
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Throws:</dt>
							
								<dt>
									 <b></b>
								</dt>
								<dd>errors.SETTING_DOES_NOT_EXIST</dd>
							
							</dl>
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="saveAll"> </a>
					<div class="fixedFont">
					
					<span class="light">{SettingsManager}</span>
					<b>saveAll</b>()
					
					</div>
					<div class="description">
						Saves all of the settings being managed by this SettingsManager. If no
settings exists, there is no error; the settings will simply not be
saved.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="set"> </a>
					<div class="fixedFont">
					
					<span class="light">{SettingsManager}</span>
					<b>set</b>(settingName, settingValue)
					
					</div>
					<div class="description">
						Sets a setting value. If a setting doesn't exist, the setting is created.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>settingName</b>
									
								</dt>
								<dd></dd>
							
								<dt>
									<b>settingValue</b>
									
								</dt>
								<dd></dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="settingExists"> </a>
					<div class="fixedFont">
					
					<span class="light">{Bool}</span>
					<b>settingExists</b>(settingName)
					
					</div>
					<div class="description">
						Checks to see if a given setting exists within this SettingsManager.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
									
								</dt>
								<dd>The name of the setting to check for
existence.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Bool}</span> True if a given setting exists or false if it doesn't.</dd>
							
							</dl>
						
						
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			&copy;2010<br />
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sun May 22 2011 22:54:54 GMT-0500 (CDT)
		</div>
	</body>
</html>
